
#Region "Summary"
''' -----------------------------------------------------------------------------
''' Project	 : PTT.StationsTracking.Data
''' Class	 : StationsTracking.Data.QueryInvDataCar
''' 
''' -----------------------------------------------------------------------------
''' <summary>
''' Query Result Single Business Entity
''' </summary>
''' <remarks>
''' Sample of business entity coding
''' </remarks>
''' <history>
''' 	[Generater by Nok]	21/3/2549 15:43:24	Created
''' </history>
''' -----------------------------------------------------------------------------
#End Region

#Region ".NET Framework Class Import"
Imports System
Imports System.Xml.Serialization
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
Imports System.Collections
#End Region

<Serializable()> _
Public Class QueryInvDataCar
#Region "Internal member variables"
    Private _CarId As Int16
    Private _BuyYear As Int16
    Private _StatusCar As Byte
    Private _CarNumber As String
    Private _Descrpition As String
    Private _ProvinceId As Byte
    Private _DataTypeId As Int16
    Private _BrandId As Int16
    Private _SizeId As Int16
    Private _ColorId As Int16
    Private _FuelId As Int16
    Private _OwnerId As Int16
    Private _InvCarProvinces As QueryInvCarProvinces
    Private _InvCarDataTypes As QueryInvCarDataTypes
    Private _InvCarBrands As QueryInvCarBrands
    Private _InvCarSizes As QueryInvCarSizes
    Private _InvCarColors As QueryInvCarColors
    Private _InvCarFuels As QueryInvCarFuels
    Private _InvOwners As QueryInvOwners
#End Region

    Public Sub New()
        _CarId = Nothing
        _BuyYear = Nothing
        _StatusCar = Nothing
        _CarNumber = Nothing
        _Descrpition = Nothing
        _ProvinceId = Nothing
        _DataTypeId = Nothing
        _BrandId = Nothing
        _SizeId = Nothing
        _ColorId = Nothing
        _FuelId = Nothing
        _OwnerId = Nothing
        _InvCarProvinces = Nothing
        _InvCarDataTypes = Nothing
        _InvCarBrands = Nothing
        _InvCarSizes = Nothing
        _InvCarColors = Nothing
        _InvCarFuels = Nothing
        _InvOwners = Nothing
    End Sub

    Public Sub New(ByVal CarId As Int16, _
       ByVal BuyYear As Int16, _
       ByVal StatusCar As Byte, _
       ByVal CarNumber As String, _
       ByVal Descrpition As String, _
       ByVal ProvinceId As Byte, _
       ByVal DataTypeId As Int16, _
       ByVal BrandId As Int16, _
       ByVal SizeId As Int16, _
       ByVal ColorId As Int16, _
       ByVal FuelId As Int16, _
       ByVal OwnerId As Int16, _
      Optional ByVal InvCarProvinces As QueryInvCarProvinces = Nothing, _
      Optional ByVal InvCarDataTypes As QueryInvCarDataTypes = Nothing, _
      Optional ByVal InvCarBrands As QueryInvCarBrands = Nothing, _
      Optional ByVal InvCarSizes As QueryInvCarSizes = Nothing, _
      Optional ByVal InvCarColors As QueryInvCarColors = Nothing, _
      Optional ByVal InvCarFuels As QueryInvCarFuels = Nothing, _
      Optional ByVal InvOwners As QueryInvOwners = Nothing)
        _CarId = CarId
        _BuyYear = BuyYear
        _StatusCar = StatusCar
        _CarNumber = CarNumber
        _Descrpition = Descrpition
        _ProvinceId = ProvinceId
        _DataTypeId = DataTypeId
        _BrandId = BrandId
        _SizeId = SizeId
        _ColorId = ColorId
        _FuelId = FuelId
        _OwnerId = OwnerId
        _InvCarProvinces = InvCarProvinces
        _InvCarDataTypes = InvCarDataTypes
        _InvCarBrands = InvCarBrands
        _InvCarSizes = InvCarSizes
        _InvCarColors = InvCarColors
        _InvCarFuels = InvCarFuels
        _InvOwners = InvOwners
    End Sub

#Region "Property"

    Public Property CarId() As Int16
        Get
            Return _CarId
        End Get
        Set(ByVal value As Int16)
            _CarId = value
        End Set
    End Property


    Public Property BuyYear() As Int16
        Get
            Return _BuyYear
        End Get
        Set(ByVal value As Int16)
            _BuyYear = value
        End Set
    End Property


    Public Property StatusCar() As Byte
        Get
            Return _StatusCar
        End Get
        Set(ByVal value As Byte)
            _StatusCar = value
        End Set
    End Property


    Public Property CarNumber() As String
        Get
            Return _CarNumber
        End Get
        Set(ByVal value As String)
            _CarNumber = value
        End Set
    End Property


    Public Property Descrpition() As String
        Get
            Return _Descrpition
        End Get
        Set(ByVal value As String)
            _Descrpition = value
        End Set
    End Property


    Public Property ProvinceId() As Byte
        Get
            Return _ProvinceId
        End Get
        Set(ByVal value As Byte)
            _ProvinceId = value
        End Set
    End Property


    Public Property DataTypeId() As Int16
        Get
            Return _DataTypeId
        End Get
        Set(ByVal value As Int16)
            _DataTypeId = value
        End Set
    End Property


    Public Property BrandId() As Int16
        Get
            Return _BrandId
        End Get
        Set(ByVal value As Int16)
            _BrandId = value
        End Set
    End Property


    Public Property SizeId() As Int16
        Get
            Return _SizeId
        End Get
        Set(ByVal value As Int16)
            _SizeId = value
        End Set
    End Property


    Public Property ColorId() As Int16
        Get
            Return _ColorId
        End Get
        Set(ByVal value As Int16)
            _ColorId = value
        End Set
    End Property


    Public Property FuelId() As Int16
        Get
            Return _FuelId
        End Get
        Set(ByVal value As Int16)
            _FuelId = value
        End Set
    End Property


    Public Property OwnerId() As Int16
        Get
            Return _OwnerId
        End Get
        Set(ByVal value As Int16)
            _OwnerId = value
        End Set
    End Property


    Public Property InvCarProvinces() As QueryInvCarProvinces
        Get
            Return _InvCarProvinces
        End Get
        Set(ByVal value As QueryInvCarProvinces)
            _InvCarProvinces = value
        End Set
    End Property


    Public Property InvCarDataTypes() As QueryInvCarDataTypes
        Get
            Return _InvCarDataTypes
        End Get
        Set(ByVal value As QueryInvCarDataTypes)
            _InvCarDataTypes = value
        End Set
    End Property


    Public Property InvCarBrands() As QueryInvCarBrands
        Get
            Return _InvCarBrands
        End Get
        Set(ByVal value As QueryInvCarBrands)
            _InvCarBrands = value
        End Set
    End Property


    Public Property InvCarSizes() As QueryInvCarSizes
        Get
            Return _InvCarSizes
        End Get
        Set(ByVal value As QueryInvCarSizes)
            _InvCarSizes = value
        End Set
    End Property


    Public Property InvCarColors() As QueryInvCarColors
        Get
            Return _InvCarColors
        End Get
        Set(ByVal value As QueryInvCarColors)
            _InvCarColors = value
        End Set
    End Property


    Public Property InvCarFuels() As QueryInvCarFuels
        Get
            Return _InvCarFuels
        End Get
        Set(ByVal value As QueryInvCarFuels)
            _InvCarFuels = value
        End Set
    End Property


    Public Property InvOwners() As QueryInvOwners
        Get
            Return _InvOwners
        End Get
        Set(ByVal value As QueryInvOwners)
            _InvOwners = value
        End Set
    End Property

#End Region
End Class

''' -----------------------------------------------------------------------------
''' Project	 : PTT.StationsTracking.Data
''' Class	 : StationsTracking.Data.QueryInvDataCars
''' 
''' -----------------------------------------------------------------------------
''' <summary>
''' Collection of query result
''' </summary>
''' <remarks>
''' Sample
''' </remarks>
''' <history>
''' 	[NOK'S Generater]	21/3/2549 15:43:27	Created
''' </history>
''' -----------------------------------------------------------------------------
<Serializable()> _
Public Class QueryInvDataCars
    Inherits CollectionBase


    Default Public ReadOnly Property Item(ByVal index As Integer) As QueryInvDataCar
        Get
            If (index < 0 Or index >= Me.InnerList.Count) Then
                Throw New Exception("index has to be between 0 and " & (Me.InnerList.Count - 1).ToString())
            Else
                Return CType(Me.InnerList(index), QueryInvDataCar)
            End If
        End Get
    End Property

    Public Sub Add(ByVal info As QueryInvDataCar)
        Me.InnerList.Add(info)
    End Sub

    Public Sub SetItem(ByVal index As Integer, ByVal value As QueryInvDataCar)
        If (index < 0 Or index >= Me.InnerList.Count) Then
            Throw New Exception("index has to be between 0 and " & (Me.InnerList.Count - 1).ToString())
        Else
            Me.InnerList(index) = value
        End If
    End Sub


End Class

